home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / rlib.zip / RL_BEEP.PRG < prev    next >
Text File  |  1993-01-04  |  726b  |  18 lines

  1. * Function: Beep
  2. * Author..: Richard C. Low
  3. * Syntax..: BEEP([exp<N>])
  4. * Returns.: Null string after ringing the bell (CHR(7)) exp<N> times
  5. *           Parameter exp<N> is optional, if omitted bell is rung once.
  6. *
  7. FUNCTION BEEP
  8. PARAMETER p_num
  9. PRIVATE f_x                                  && private counter variable
  10. IF TYPE('p_num') = 'N'                       && make sure parm is numeric
  11.    FOR f_x = 1 TO p_num                      && if so, beep that many times
  12.       ?? CHR(7)
  13.    NEXT f_x
  14. ELSE                                         && if no parm or not numeric
  15.    ?? CHR(7)                                 && beep only once
  16. ENDIF
  17. RETURN ('')                                  && must return something
  18.